The present invention relates to a method for controlling a computer and a recording medium, and in particular to a method for controlling a computer and a recording medium that allows an operating system to control electronic power or the like on the computer.
Conventionally, power management of a personal computer (PC) has been performed by an Advanced Power Management (APM), for example. In recent years, a standard called an xe2x80x9cAdvanced Configuration and Power Interfacexe2x80x9d (ACPI), which allows such a function to be performed mainly by an operating system (OS), has become known.
The ACPI allows the OS to monitor the usage of a system including the PC and peripheral devices and select devices and services that are not required by the user or an application to shut down them because the OS can directly control the power management and plug-and-play functions.
However, because only those events that are defined in the ACPI standard can be handled in the ACPI environment and standard processes for those events are predefined, it is difficult to perform a special process for a system-specific event.
For example, when a user depresses an eject button on the docking station, which contains a hard disk drive and other components, of a notebook PC in suspend mode (a state after an operation status is stored and power to peripheral devices is shut off) with the docking station being attached to it to detach the PC from the docking station (undocking), a process should be performed by the OS for bringing the system into a state in which the undock can be permitted before permitting the user to undock the PC. To accomplish this, the system is activated (resumed) and an undock request defined in the ACPI standard is issued by the ACPI BIOS to the OS to cause the OS to perform a process for the undock request.
Although the user""s intent is to detach the PC from the docking station with the PC in suspend mode rather than resuming the operation of the PC, the PC remains resuming operation because the ACPI standard defines no process for restoring the PC to the suspend mode after it is undocked. Thus, there is a problem that the occurrence of a system-specific event that the PC is detached from the docking station leads to a result different from a user""s intent.
The present invention has been achieved in light of the above-mentioned fact and it is an object of the present invention to provide a method for controlling a computer and a recording medium that allow a process that is not defined in a standard when a system-specific event occurs
To attain the above-mentioned object, a first feature of the present invention is a method for controlling a computer that notifies an operating system of a request event corresponding to a device event from hardware. A device event may be generated, for example by a user operating a keyboard or mouse connected to the computer. That is, the device event occurs when a certain event is provided to the hardware of the computer. A request event causes a process corresponding to the device event to be performed under the control of an operating system. Then a response event from the operating system caused by the notification of the request event is accepted and a process event corresponding to the accepted response event is output to the hardware.
The operating system knows the occurrence of the device event by receiving the notification of the request event and outputs the response event for causing a process corresponding to the device event to be performed. The process event is a process corresponding to the response event, that is, a process corresponding to the device event. The process corresponding to the device event is predefined in a standard used by the computer, for example. The above-described process can be performed by a basic system configured so as to comprise a BIOS, for example.
After the basic system accepts the response event, it notifies the operating system of an additional event associated with the response event. The additional event is an event for causing a process other than the predefined process corresponding to the device event to be performed. Thus, the operating system is notified of a plurality of events for the occurrence of a single device event. An additional response event corresponding to the additional event from the operating system is accepted and the additional process event corresponding to the accepted additional response event is further output to the hardware.
Thereby, because a process, which is not predefined, is allowed to be performed in this way if a system-specific event occurs in a system including a computer, the process just as the user intended can be achieved.
In addition, in the basic system, after a response event is accepted and a process event is output, the notification and acceptance of an intermediate event may be performed then an additional event associated with the response event may be notified to the operating system.
Another feature of the present invention is a computer comprises a basic system for notifying an operating system of a request event corresponding to a device event in response to the device event from hardware, accepting a response event of the operating system caused by the notification, and outputting a process event corresponding to the accepted response event to the hardware. The basic system comprises a notifier for notifying the operating system of an additional event associated with the response event after receiving the response event, an acceptor for accepting an additional response event corresponding to the additional event from the operating system, and an output for outputting an additional process event corresponding to the accepted additional response event to the hardware. Thus, a process matching a user""s intent can be performed even if an event that is specific to a system, including a computer, is generated.
Another feature of the present invention is a recording medium that contains a program for controlling a computer for a device event provided from hardware in the computer comprising a basic system for notifying an operating system of a request event corresponding to the device event in response to the device event from the hardware, accepting a response event of the operating system caused by the notification, and outputting a process event corresponding to the accepted response event to the hardware. Provided is a program comprising the steps of: notifying the operating system of an additional event associated with the response event after receiving the response event in the basic system; accepting an additional response event corresponding to the additional event from the operating system; and further outputting an additional process event corresponding to the accepted additional response event to the hardware; thereby allowing the computer to perform a process that is not predefined if an event that is specific to a system, including the computer, is generated.
Various other objects, features, and attendant advantages of the present invention will become more fully appreciated as the same becomes better understood when considered in conjunction with the accompanying drawings, in which like reference characters designate the same or similar parts throughout the several views.